<template>
  <v-md-editor
    :mode="mode"
    v-model="text"
    :disabled-menus="disabledMenus"
    @copy-code-success="handleCopyCodeSuccess"
  />
</template>
<script>
export default {
  name: 'MdEditor',
  props: {
    mode: {
      type: String,
      default: 'preview'
    },
    text: {
      type: String
    },
    disabledMenus: {
      type: Array
    }
  },
  data() {
    return {}
  },
  created() {},
  methods: {
    handleCopyCodeSuccess() {
      this.$message({
        type: 'success',
        showClose: true,
        message: '复制成功'
      })
    }
  }
}
</script>
<style></style>
